/*
 *   Copyright©2023 JoyCastle.
 *   All Rights Reserved.
 *   
 *   FileName:     DataPointTools.cs
 *   Author:       Administrator
 *   CreateTime:   2024/04/11 10:15:23
 *   UnityVersion: 2020.3.48f1c1
 *   Version:      1.2.2
 *   Description:
 *   
 */

using System;
using System.Collections;
using System.Collections.Generic;
using GTA;
using UnityEngine;

namespace offline2048
{
    public class DataPointTools : MonoSingleton<DataPointTools>
    {
        private const string DATA_POINT_SHOW_INTERSTITIAL_AD_TIMES = "Data_Point_Show_Interstitial_Ad_Times";//记录查看插屏广告的次数
        private const string DATA_POINT_SHOW_REWARD_AD_TIMES = "Data_Point_Show_Reward_Ad_Times";//记录查看激励广告的次数
        
        public void AddShowInterstitialAdTimes()
        {
            int times = PlayerPrefs.GetInt(DATA_POINT_SHOW_INTERSTITIAL_AD_TIMES, 0);
            times++;
            PlayerPrefs.SetInt(DATA_POINT_SHOW_INTERSTITIAL_AD_TIMES,times);
        }
        
        public int GetShowInterstitialAdTimes()
        {
            return PlayerPrefs.GetInt(DATA_POINT_SHOW_INTERSTITIAL_AD_TIMES, 0);
        }
        
        public void AddShowRewardAdTimes()
        {
            int times = PlayerPrefs.GetInt(DATA_POINT_SHOW_REWARD_AD_TIMES, 0);
            times++;
            PlayerPrefs.SetInt(DATA_POINT_SHOW_REWARD_AD_TIMES,times);
        }
        
        public int GetShowRewardAdTimes()
        {
            return PlayerPrefs.GetInt(DATA_POINT_SHOW_REWARD_AD_TIMES, 0);
        }

    }
}



